Caching is an important technology for the efficient exchange of electronic resources, for example a request and response of a file across a network. A device may act as a requester by requesting a resource from another device, which may act as a provider by providing the resource in response to the request. A requester, such as a server or a user computing device, may require the same resource multiple times. Varying lengths of time may separate the instances in which the requester needs the provider's resource. In an attempt to avoid unnecessarily redundant requests, a requester may cache a resource after receiving it and use the cached copy the next time that resource is needed. Caching provides a number of benefits, such as providing the device requesting the resource with faster access to the resource, reducing network traffic, and reducing load on the device providing the resource. However, caching may come at a cost. The provider's copy of the resource may change after being provided to the requester. Should the requester later rely on a cached copy of the resource, that copy may be considered stale, since it is not equivalent to the copy then available to the provider. Using a stale copy of a resource may be less desirable than using a a “fresh” copy of the resource.
To reduce the use of stale copies, a system may employ a time to live (“TTL”) mechanism in which the provider includes a TTL value when responding with a requested resource. The TTL value may suggest a time at which the requester should consider that copy of the resource to be stale. Should the requester need the resource before the TTL expires, it should use its cached copy of the resource. Should the requester need the resource after the TTL expires, it should request a new copy of the resource from the provider.